import axios from 'axios'
import thunk from 'redux-thunk'
export const addCount = (count) => {
    return {
        type:"ADD_COUNT",
        count
    }
}

export const setVisible = (visible) => {
    return {
        type:"SET_VISIBLE",
        visible
    }
}

export const setStudent = (id) => {
    return (dispath,state) => {
        axios({
            type:"get",
            url:"/students/" + id
        }).then((res) => {
            dispath({
                type:"SET_STUDENT",
                student:res.data
            });
        });
    }
}